<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="contents">
<c:if test="${ regi eq 'y' }">
	<c:if test="${ isregi eq 'success' }">
		<div class="alert alert-success alert-dismissable">
		  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
		  <strong>영화관 등록 성공!</strong>
		</div>
	</c:if>
	<c:if test="${ isregi eq 'fail' }">
		<div class="alert alert-danger alert-dismissable">
		  <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
		  <strong>영화관 등록 실패!</strong> 영화관 정보를 다시 한번 확인해 주세요.
		</div>
	</c:if>
</c:if>
<form id="cineregi" method="post">
	<fieldset>
		<legend>영화관 등록</legend>
		<div id="center">
			<div>
				<label for="cinename" class="control-label">영화관 이름</label>
				<input type="text" class="form-control" id="cinename" name="cinename"
				 placeholder="영화관 이름(ex:부평 롯데시네마)" title="영화관 이름을 입력하세요" required="required" />
			</div>
			<div>
				<label for="cineaddr" class="control-label">주소</label>
				<input type="text" name="zip1" id="zip1" class="form-control" required="required" readonly="readonly" />
				<span id="dash">-</span>
				<input type="text" name="zip2" id="zip2" class="form-control" required="required" readonly="readonly" />
				<button type="button" id="findzipcode" class="btn btn-info" data-toggle="modal" data-target="#zipcodeModal">우편번호 찾기</button>
				<input type="text" name="addr1" id="addr1" class="form-control" readonly="readonly" />
				<input type="text" name="addr2" id="addr2" class="form-control" placeholder="나머지 주소" title="장르를 선택하세요" />
			</div>
			<div>
				<label for="theater" class="control-label">상영관</label>
				<select class="form-control" id="theater" name="theater" title="상영관 개수를 선택하세요" required="required">
					<option>상영관 개수</option>
					<c:forEach var="i" begin="1" end="20">
						<option value="${i}">${i}</option>
					</c:forEach>
				</select>
			</div>			
			<div id="btn">
				<label class="control-label"></label>
				<button type="submit" class="btn btn-primary">등 록</button>
				<button type="reset" class="btn btn-default">다시입력</button>
			</div>
		</div>
	</fieldset>
</form>
<!-- Modal -->
<div class="modal fade" id="zipcodeModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="zipcodeModalLabel">우편번호 찾기</h4>
      </div>
      <div class="modal-body">
			<div>
				<label for="uid" class="blind">동이름 검색</label>
				<input type="text" name="dong" id="dong" class="form-control" title="검색할 주소의 동이름을 입력하세요" placeholder="검색할 주소의 동이름을 입력하세요" />
				<button type="button" class="btn btn-danger" id="findbtn">검 색</button>
			</div>
			<div>
				<select id="ziplist" class="form-control" size="10">
					
				</select>
			</div>					
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" id="okbtn" data-dismiss="modal">확 인</button>        
        <button type="button" class="btn btn-default" id="closebtn" data-dismiss="modal">닫 기</button>        
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>

<script src="js/admin-zipcode-ajax.js"></script>
